import { h, renderSlots, getCurrentInstance, provide, inject } from '../lib/guide-mini-vue.esm.mjs'
import Bar from './Bar.js'
export default {
  name: 'Foo',
  setup(props, {emit, slots}) {
    const instance = getCurrentInstance()
    // console.log(slots)
    const add = ()=> {
      emit('add',1, 2)
    }
    return {
      add
    }
  },
  render() {
    console.log(this.$slots)
    const btn = h('button', {
      onClick: this.add
    }, 'btn')
    const header = renderSlots(this.$slots, 'header', {age: 11})
    const footer = renderSlots(this.$slots, 'footer')
    const p = h('p', {}, `foo: ${this.count}`)
    const bar = h(Bar)
    return h('div', {}, [header, p, btn, footer, bar])
  }
}